package com.aurora_manito.xiaomi.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.List;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author Aurora_Manito
 * @since 2020-05-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_goods")
@ApiModel(value="Goods对象", description="")
public class Goods extends Model<Goods> implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String name;

    private Date putdate;

    private String pictureid;

    private Integer price;

    private Integer star;

    private Integer goodtypeid;
    @TableField(exist = false)          // 不让属性名作为数据库字段查询
    private GoodsType goodsType;
    @TableField(exist = false)          // 不让属性名作为数据库字段查询
    private List<Goodsimage> goodsimageList;
    //重写这个方法，return当前类的主键
    @Override
    protected Serializable pkVal() {
        return id;
    }


}
